package com.young.jpademo2.controller;

import com.young.jpademo2.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.HashMap;
import java.util.Map;

@Controller
public class Test {
    @RequestMapping(value = " ",method = RequestMethod.GET)
    @ResponseBody
    public Object test() throws Exception {
        Map map=new HashMap();
        map.put("code",200);
        map.put("message","加密成功！");
        return map;
    }

    @RequestMapping(value = " ",method = RequestMethod.POST)
    @ResponseBody
    public User tes2t() throws Exception {

        return new User();
    }
}
